﻿@{
    Check.User(Can.DeletePage);
    
    var contentId = UrlData[0];
    if (contentId.IsInt()) {
        var db = Database.Open((string) App.Database);
        var commandText = @"DELETE FROM PageContent WHERE ContentId = @0";
        db.Execute(commandText, contentId);
    }
    Response.Redirect("~/Admin/Pages/List/");
}